package com.agimatec.locators.predicate.css;

import com.agimatec.locators.predicate.LocatorStringProducer;

class CssCssClass implements LocatorStringProducer {
    private String cssClass;

    public CssCssClass(String cssClass) {
        this.cssClass = cssClass;
    }

    public String locatorString() {
        StringBuilder result = new StringBuilder();
        String[] classNames = this.cssClass.split(" ");
        for(String className: classNames){
            result.append(".").append(className);
        }
        return result.toString();
    }
}
